<html>
    <head>
        <?php
        include_once 'titulo.php';
        include_once 'cabecalho.php';
        include_once 'MySQL.php';
        include_once 'script/functions.php';
        ?>
        <title>Vidracaria</title>
        <script type="text/javascript" src="script/jquery.maskedinput-1.3.min.js"></script>
        <script>
            jQuery(function($){  
                $("#data").mask("99/99/9999");
                $("#data2").mask("99/99/9999");
            });      
        </script>
                    <script>
                $(function() {
                    $.datepicker.setDefaults( $.datepicker.regional[ "pt-BR" ] );
                    $("#data").datepicker();
                    $("#data2").datepicker();
                });	
            </script>
    </head>
    <body>
        <div class="total">
            <div class="cabecalho">
            </div>
            <div class="conteudo">
                <div class="subconteudo">
                    <?php
                    include_once 'menuHorizontal.php';
                    ?>
                    <?php
                    echo "<table class='tblLogin'>";
                    echo "<form action='relatorio_comissaoVenImpre.php' method='post'>";
                    echo "<thead>";
                    echo "<tr><td colspan='3'><label>Pagamento Mensal</label>";
                    echo "</thead>";
                    echo "<tbody>";
                    echo "<tr><td><label class='label'>Funcionario </label>";

                    $sql = "CALL sp_getFuncionarioByCargo('2')";
                    $resultado = executaSQL($sql);
                    echo "<td><select name='FUNCIONARIO'>";
                    while ($linha = mysqli_fetch_array($resultado)) {
                        echo "<option value='" . $linha['fun_id'] . "'>" . $linha['fun_nome'] . "</option>";
                    }
                    echo "<select></tr>";



                    echo "<tr><td>";
                    echo "<label class='label'>Inicio </label>";
                    echo "<td colspan=2><input type='date' name='INICIO' size='25px' id='data' class='inputMaior'>";

                    echo "<tr><td>";
                    echo "<label class='label'>Inicio </label>";
                    echo "<td colspan=2><input type='date' name='FIM' size='25px' id='data2' class='inputMaior'>";

                    echo "<tfoot>";
                    echo "<tr><td colspan='3'>";
                    echo "<input type='submit' value='    VISUALIZAR' class='btnCalcular'>";
                    echo "</tfoot>";

                    echo "</form>";
                    ?>


                </div>
            </div>
        </div>

    </body>
</html>

<?php

function executaSQL($sql) {
    $mySQL = new MySQL;
    $resultado = $mySQL->execSP($sql);
    return $resultado;
}
?>